1.Field of the Invention
The invention relates generally to an image compression scheme, and more particularly to a method for estimating a size of a compressed image.
2.Description of Related Art
Generally speaking, a color filter array (CFA) is constructed by interlacing three or more color filter channels, in which each of the color filter channels allows visible light of specific frequencies to pass towards the corresponding image sensor. Therefore, during operation, the color content is resolved by the corresponding sensor element.
A conventional compression method samples the green color information on the CFA and thereafter adopts a summation of a first-order derivative as a reference basis. However, the conventional method generates inaccurate estimations of image compression ratio. A reason for this phenomenon is that, when a main feature appears in red and blue colors, the summation result of the green samples brings about a severe underestimation. Consequently, the selection of the testing compression parameters is impacted, which will result in large discrepancies of the real size of compressed image. On the other hand, when reproducing images having a fixed frequency distribution, such as images captured from the screen of a liquid crystal display (LCD), because such images have a fixed frequency distribution, there is a severe underestimation phenomenon in this case. Moreover, due to adjustment of different parameters in an image, the same image from the CFA would produce dissimilar results. Alternatively, an inaccurate estimation of an image compression may also occur with different sensitivity settings.
However, in order to sample the green color information on the CFA and to adopt the summation of a first-order derivative as the reference basis, a large quantity of samples is needed as the basis for adjusting the testing image size after compression. As different image sizes all require large quantities of image results as the bases thereof, a large amount of calculation time is accordingly wasted.
Furthermore, when the estimated size of the compressed image is inaccurate and the storing memory is insufficient for the compressed image, a write error may result when writing a file. In addition, an extra storage time is wasted.